+2007-05-28 Richard Hult <richard@imendio.com>
+
+ * gdk/quartz/gdkwindow-quartz.c: Add comments about what various
+ coordinates are relative to.
+
2007-05-28 Carlos Garnacho <carlos@imendio.com>
* gtk/gtkwidget.c (gtk_widget_propagate_hierarchy_changed_recurse):
static void
gdk_window_impl_quartz_get_size (GdkDrawable *drawable,
- gint *width,
- gint *height)
+ gint *width,
+ gint *height)
{
g_return_if_fail (GDK_IS_WINDOW_IMPL_QUARTZ (drawable));
return title;
}
-/* FIXME: Should probably be in screen instead. */
+/* FIXME: It would be nice to have one function that takes an NSPoint
+ * and flips the coords for any window.
+ */
gint
_gdk_quartz_window_get_inverted_screen_y (gint y)
{
{
NSRect content_rect =
NSMakeRect (private->x,
- _gdk_quartz_window_get_inverted_screen_y (private->y) ,
+ _gdk_quartz_window_get_inverted_screen_y (private->y),
impl->width, impl->height);
NSRect frame_rect = [impl->toplevel frameRectForContentRect:content_rect];
*y = rect.y;
}
+/* Returns coordinates relative to the root. */
void
_gdk_windowing_get_pointer (GdkDisplay *display,
GdkScreen **screen,
_gdk_windowing_window_get_pointer (_gdk_display, _gdk_root, x, y, mask);
}
-/* Returns coordinates relative to the upper left corner of window. */
+/* Returns coordinates relative to the passed in window. */
GdkWindow *
_gdk_windowing_window_get_pointer (GdkDisplay *display,
GdkWindow *window,
CGDisplayMoveCursorToPoint (CGMainDisplayID (), CGPointMake (x, y));
}
+/* Returns coordinates relative to the found window. */
GdkWindow *
_gdk_windowing_window_at_pointer (GdkDisplay *display,
gint *win_x,